#include"Stack.h"

void test()
{
	Stack s;
	StackInit(&s);
	StackPush(&s, 1);
	StackPush(&s, 2);
	StackPush(&s, 3);
	printf("%d ", StackTop(&s));
	StackPop(&s);
	printf("%d ", StackTop(&s));
	StackPop(&s);
	printf("%d ", StackTop(&s));
	StackPop(&s);
	printf("\n");

	StackPush(&s, 10);
	StackPush(&s, 20);
	StackPush(&s, 30);
	int size = StackSize(&s);
	printf("%d ", size);
	printf("\n");
	
	while (!StackEmpty(&s))
	{
		printf("%d ", StackTop(&s));
		StackPop(&s);
	}

	StackDestroy(&s);
}

int main()
{
	test();
	return 0;
}